package com.pfsoft.grpcserver.common.enums;


import com.pfsoft.grpcserver.common.utils.LanguageContext;

/**
 * @author hudenian
 * @date
 * @description
 */
public enum ErrorMsg {

    /**
     * 通用
     */
    SUCCESS("成功", "Success"),
    PARAM_ERROR("请求参数错误", "Request param error"),
    EXCEPTION("系统异常，请联系管理台", "System exception,please contact the administrator"),
    PARAM_TYPE_ERROR("参数类型错误", "Param type error"),
    REQUEST_METHOD_ERROR("请求方式错误", "Request method error"),
    PARAM_FORMAT_ERROR("参数格式错误", "Param format error"),
    BIZ_FAILED("业务失败", "Business failed"),
    BIZ_EXCEPTION("业务异常", "Business exception"),
    BIZ_QUERY_NOT_EXIST("查询内容不存在", "Query content does not exist"),

    /*订单*/
    ORDER_NOT_EXIST("订单不存在","order does not exists")
    ;

    private final String zh;
    private final String en;

    ErrorMsg(String zh, String en) {
        this.zh = zh;
        this.en = en;
    }

    public String getMsg() {
        return LanguageContext.getByLanguage(this.zh, this.en);
    }
}
